//
//  AddressCell.m
//  WorkNest
//
//  Created by qbm360 on 15/7/16.
//  Copyright (c) 2015年 nest. All rights reserved.
//

#import "AddressCell.h"

@interface AddressCell ()

@property (weak, nonatomic) IBOutlet UILabel *phoneNumber;
@property (weak, nonatomic) IBOutlet UILabel *address;
@property (weak, nonatomic) IBOutlet UIImageView *defaultImage;
@property (weak, nonatomic) IBOutlet UIImageView *checkImage;
@property (weak, nonatomic) IBOutlet UILabel *name;

@end

@implementation AddressCell

- (void)awakeFromNib {
    self.checkImage.hidden = YES;
    self.defaultImage.hidden = YES;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
}

- (void)setIfDefault:(BOOL)ifDefault {
//    _ifDefault = ifDefault;
//    if (_ifDefault) {
//        self.defaultImage.hidden = NO;
//    } else {
        self.defaultImage.hidden = YES;
//    }
}

- (void)setIfCheck:(BOOL)ifCheck {
    _ifCheck = ifCheck;
    if (_ifCheck) {
        self.checkImage.hidden = NO;
    } else {
        self.checkImage.hidden = YES;
    }
}

- (void)setAddressModel:(AddressModel *)addressModel {
    _addressModel = addressModel;
    self.phoneNumber.text = _addressModel.cellPhone;
    self.name.text = _addressModel.name;
    self.address.text = [NSString stringWithFormat:@"%@%@%@%@",_addressModel.province,_addressModel.city,_addressModel.district,_addressModel.address];
}

@end
